package com.quanxiaoha.xiaohashu.kv.biz.config;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.cassandra.config.AbstractCassandraConfiguration;

/**
 * @Author: jingyan_liu
 * @CreateTime: 2025-07-25
 * @Description:
 * @Version: 1.0
 */


@Configuration
public class CassandraConfig extends AbstractCassandraConfiguration {
	
	@Value("${spring.cassandra.keyspace-name}")
	private String keySpace;
	
	@Value("${spring.cassandra.contact-points}")
	private String contactPoints;
	
	@Value("${spring.cassandra.port}")
	private int port;
	
	/*
	 * Provide a keyspace name to the configuration.
	 */
	@Override
	public String getKeyspaceName() {
		return keySpace;
	}
	
	@Override
	public String getContactPoints() {
		return contactPoints;
	}
	
	@Override
	public int getPort() {
		return port;
	}
}
